<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>审核页面</title>
    <link rel="stylesheet" href="../../res/layui/css/layui.css" media="all">
    <script src="../../res/js/jquery-3.1.1.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../res/layui/layui.js"></script>
</head>
<body>
<table class="layui-hide" id="test" lay-filter="test"></table>
<script type="text/javascript" charset="utf-8">
    var table2=null;
    layui.use('table', function(){
        var table = layui.table;
        table2=table.render({
            elem: '#test'
            ,url:'../../menAudit/findAll'
            ,page: true //开启分页
            ,toolbar: '#toolbarDemo'
            ,title: '审核'
            ,cols: [[
                {field:'auTime', title:'审核时间'}
                ,{field:'auExp', title:'审核意见'}
                ,{field:'saName', title:'业务名称'}
                ,{field:'auditState', title:'审核状态' ,sort: true,templet:function(obj){
                        if(obj.auditState=="10"){
                            return "申请中";
                        }else if(obj.auditState=="20"){
                            return "领导已同意";
                        }else if(obj.auditState=="21"){
                            return "领导未同意";
                        }else if(obj.auditState=="30"){
                            return "待回复";
                        }else if(obj.auditState=="40"){
                            return "已回复";
                        }
                    }}
                ,{fixed:'right', title:'操作', toolbar: '#barDemo', width:320}
            ]]
        });
    });
</script>
<script type="text/html" id="toolbarDemo">
    <div class="layui-input-inline" style="float:left;margin-left:15px;">
        <input type="text" placeholder="请输入方案名" id="schemeName" class="layui-input" style="width:200px;float:left;height:32px;">
        <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="search" id="search" style="margin-left: 10px;">搜索</button>
    </div>
</script>

<script type="text/html" id="barDemo">
    <a class="layui-btn layui-btn-xs" lay-event="look">查看</a>
</script>
</body>
</html>